<#import "../../../widgets/pager.htm" as q>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>首页</title>
<script src="${request.contextPath}/resources/style/js/sdmenu.js" ></script>
<script src="${request.contextPath}/resources/style/js/jquery/jquery-1.7.1.min.js" ></script>
<link href="${request.contextPath}/resources/style/css/css.css" rel="stylesheet" type="text/css"/>
<link href="${request.contextPath}/resources/style/css/window.css" rel="stylesheet" type="text/css"/>

<script src="${request.contextPath}/resources/style/js/bootstrap.min.js" ></script>
<link href="${request.contextPath}/resources/style/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>

</head>
<body>
<#include "../top.htm">
<div class="hide-top">
</div>
<#include "../leftMenu.htm">
<div class="main float-left" align='center'>
		<div class='main-info' style='width:90%;'  align='left'>
				<div class="help-main">
					 <table>
						<tr>
							<td>
								<ul class='help-menu'  style="width:150px">
									<li><a href="#" class='clickUrl'>帮助选项</a></li>
									<li><a href="#">帮助选项</a></li>
									<li><a href="#">帮助选项</a></li>
									<li><a href="#">帮助选项</a></li>
								</ul>
							</td>
							<td><div class='help-info'>									您也可以一次删除/回收多个文件。使用文章左侧的复选框，选择您需要操作的文件，然后从“批量操作”下拉菜单中选择您的操作类型。点击“应用”，操作即生效。在使用”批量编辑“时，您可以一次编辑这些文章的多个属性（分类目录、作者等）。要从待编辑文章中移除某篇，请在”批量编辑“区域中点击其标题旁边的“x”。
								</div>
							</td>
						</tr>
					</table>
				</div>
				<div class="float-right help-div"> 帮助</div>
				
				<div style="padding-top:10px"><font class="font-size1">栏目</font></div>
			<!-- 
			<div  class='text-right'>	
				<input type="text" class="form-horizontal" placeholder="搜索">
					 <input class="input" value="搜&nbsp;索" type="button"/> 
				</div>
				 -->
				 <br></br>
				<div  class='text-left'>
					<select  style='width:150px' onchange='changeCategory(this.value)'>
						<option value=''>选择分类</option>
						<#if categorys??>
							<#list categorys as category>	
								<option value="${category.categoryid}" class='forums-list'>${category.name}</option>
							</#list>
					    </#if>
					</select>
				</div>	 
				
				 <br/>
				
			 
				<div class='data-list' >
				  <table style='width:100%;' class='table table-striped'>
					 <tr>
						<th width='20%'>名称</th><th width='20%'>URL</th><th  width='20%' >分类目录</th><th  width='20%' >可见性</th><th  width='20%' >评分</th>
					 </tr>
					  	<#if page.result??>
							<#list page.result as forum>
							 <tr>
								<td><div class='data'>${forum.name} </div>
								  <div class='handle'><span class="handle-info"><a href="${request.contextPath}/admin/forum/delete/${forum.forumsid}">删除</a>|<a href="${request.contextPath}/admin/forum/update/${forum.forumsid}">编辑</a></span>&nbsp;
								</div>
								</td>
								<td>codex.wordpress.org</td><td>链接表</td><td>是</td><td>0</td>
							 </tr>
							</#list>
					</#if>
				 </table>
				 	 	<#if page.totalCount??>
						  		 <@q.pager pageNo=page.pageNumber pageSize=page.pageSize recordCount=page.totalCount toURL=page.toUrl/>
						</#if> 
			</div>
			 <br></br>
				<div  class='text-left'>
				<input type="button" name="add_forum" id="add_forum" value="新增" ></input>
			</div>	
		</div>
	</div>
	<table>
		<tr>
					 
	</table>
</body>
</html>
<script type="text/javascript">
	// <![CDATA[
	var myMenu;
	window.onload = function() {
		myMenu = new SDMenu("my_menu");
		myMenu.init();
		var firstSubmenu = myMenu.submenus[0];
		myMenu.expandMenu(firstSubmenu);
	};
		if(jQuery(window).height()>960){
			jQuery('.main').width('960px');
		}else{
		  jQuery('.main').width(jQuery(window).width()-140);
		}
		jQuery('.menu').height(jQuery('.main').height());
		jQuery(function(){
			jQuery('.help-div').click(function(){
				jQuery('.help-main').toggle();
			})
			jQuery('div.main .data-list  table td').hover(function(){
				jQuery(this).find('.handle-info').toggle();
			})
			jQuery('#add_forum').click(function(){
				window.location.href="${request.contextPath}/admin/forum/add";
			})
			
		})
		function changeCategory(id){
			window.location.href="./findForum.htm?categoryid="+id;
		}
		<#if forum.categoryid??>
		jQuery(".forums-list[value='${forum.categoryid}']").attr('selected','selected');
		</#if>
	// ]]>
	</script>
	<#include "../../../widgets/googleAnalytics.htm">